﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Xml.XPath;

namespace RuleManagerTest.Mock
{
    public class AssignmentActionExecutorMock : InfoPathDebugger.RuleManager.IActionExecutor
    {
        #region IActionExecutor Members

        public void Execute(XPathNavigator actionNav, XPathNavigator dataSourceNav, Object additionalData)
        {
            actionNavigator = actionNav.CreateNavigator();
            dataSourceNavigatorBeforeExecute = dataSourceNav.CreateNavigator();

            InfoPathDebugger.RuleManager.AssignmentActionExecutor assgnActionExecutor = new InfoPathDebugger.RuleManager.AssignmentActionExecutor();
            assgnActionExecutor.Execute(actionNav, dataSourceNav, null);

            dataSourceNavigatorAfterExecute = dataSourceNav.CreateNavigator();
        }

        #endregion

        public XPathNavigator dataSourceNavigatorAfterExecute = null;
        public XPathNavigator actionNavigator = null;
        public XPathNavigator dataSourceNavigatorBeforeExecute = null;
    }
}
